<?php

use Illuminate\Http\Request;
require_once ('mini_program_api.php');
require_once ('mini_program_admin_api.php');
require_once ('admin_api.php');

/*
|--------------------------------------------------------------------------
| API 路由
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

// Route::any('/test/assets','API2Controller@newAssets');


Route::any('/appUser/nuan100Login', 'APIController@onNuan100Login');
Route::any('/appUser/feiNiaoLogin', 'APIController@onFeiNiaoLogin');


//小程序用户接口
Route::any('/appUser/list', 'APIController@userList');

Route::any('/appUser/register', 'API2Controller@Impl_userRegister');
Route::any('/appUser/phoneRegisterStatus', 'API2Controller@Impl_userPhoneRegisterStatus');
Route::any('/appUser/detail', 'API2Controller@Impl_detailUser');
Route::any('/appUser/phoneRegister', 'API3Controller@Impl_phoneRegister');


Route::any('/appUser/unifiedOrder', 'API2Controller@Impl_unifiedOrder');            //用户下单
Route::any('/appUser/successOrder', 'API2Controller@Impl_successOrder');            //支付成功
Route::any('/appUser/cancelOrder', 'API2Controller@Impl_cancelOrder');            //支付失败


Route::any('/appUser/roleUpdate', 'API2Controller@Impl_roleUpdate');            //支付失败


Route::any('/feed/swiperList', 'APIController@Impl_swiperList');


//首页订阅借口，显示推荐或者近期的各类信息，新增咖啡馆，留言，烘焙师等
Route::any('/feed/list', 'APIController@Impl_feedsList');
Route::any('/feed/cafesAndMessages', 'APIController@Impl_feedCafesAndMessages');


//咖啡馆接口

// Route::any('/cafe/timeUpdate','APIController@Impl_cafesTimeUpdate');
Route::any('/cafe/flavours', 'API3Controller@Impl_cafeFlavours');            //咖啡馆的风味标签


Route::any('/cafe/detailCURD', 'API2Controller@Impl_cafeDetail');        //后台咖啡馆详细信息
Route::any('/cafe/log', 'API2Controller@Impl_sysCafeLog');                //咖啡馆登录日志


Route::any('/cafe/setUserVisit', 'APIController@Impl_setUserVisitCafe');                //咖啡馆登录日志
Route::any('/cafe/setStatus', 'API2Controller@Impl_cafeStatus');                //咖啡馆状态
Route::any('/cafe/updateDesignSummary', 'API2Controller@Impl_updateDesignSummary');                //咖啡馆设计风格
Route::any('/cafe/updateCafeSupplys', 'API2Controller@Impl_cafeSupplyUpdate');                //咖啡馆设计风格


//文章接口
Route::any('/goods/detail', 'APIController@Impl_goodsDetail');
Route::any('/goods/list', 'APIController@Impl_goodsList');
Route::any('/goods/update', 'API3Controller@Impl_goodsUpdate');

//理想放映
Route::any('/party/detail2', 'APIController@partyDetail2');
Route::any('/party/info', 'API3Controller@Impl_partyInfo');        //少量信息
Route::any('/party/new', 'API3Controller@Impl_partyCreate');
Route::any('/party/new2', 'API3Controller@partyNew2');
Route::any('/party/supplyNumber', 'API3Controller@Impl_partySupplyNumber');

Route::any('/partyUser/new', 'API3Controller@Impl_partyUserCreate');

Route::any('/partyBean/new', 'API3Controller@Impl_partyBeanCreate');        //杯测豆子
Route::any('/partyBean/del', 'API3Controller@Impl_partyBeanDel');

//销售接口
Route::any('/sale/update', 'API3Controller@Impl_saleUpdate');
Route::any('/sale/del', 'API3Controller@Impl_saleDel');
Route::any('/sale/detail', 'API3Controller@Impl_saleDetail');

Route::any('/sale/updateSaleOrderDeliver', 'API3Controller@Impl_updateSaleOrderDeliver');
Route::any('/sale/saleOrderDetail', 'API3Controller@Impl_saleOrderDetail');
Route::any('/sale/orderList', 'API3Controller@Impl_saleOrderList');


Route::any('/task/list', 'API3Controller@Impl_taskList');
Route::any('/task/update', 'API3Controller@Impl_taskUpdate');
Route::any('/task/detail', 'API3Controller@Impl_taskDetail');

//auth接口
Route::any('/cos/auth', 'APIController@Impl_createReusableSignature');


//Impl_getCaptcha
Route::any('/captcha/new', 'API3Controller@Impl_getCaptcha');
Route::any('/wechat', 'APIController@wechat');

/**
 * Common公共接口
 */
// 获取签名
Route::get('/common/createReusableSignature', 'CommonController@createReusableSignature');
Route::any('/wei/test', 'WeiController@getSig');
// 视频处理回调
Route::post('/common/callback', 'CommonController@callback');
// 获取图片信息接口
Route::get('/common/getImageInfo', 'CommonController@getImageInfo');